package com.sxj.PDMS.mapper;

import com.sxj.PDMS.model.entity.PartyMemberAwards;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
* @author 503c'j
* @description 针对表【party_member_awards(党员奖励表)】的数据库操作Mapper
* @createDate 2024-06-16 17:26:29
* @Entity com.sxj.PDMS.model.entity.PartyMemberAwards
*/
public interface PartyMemberAwardsMapper extends BaseMapper<PartyMemberAwards> {

    List<PartyMemberAwards> selectByContentOrMemberNumberOrDate(@Param("start") Integer start,
                                                                @Param("pageSize") Integer pageSize,
                                                                @Param("bonusContent") String bonusContent,
                                                                @Param("partyMemberNumber") Long partyMemberNumber,
                                                                @Param("awardDate") Date awardDate);

    Long selectTotalByContentOrMemberNumberOrDate(@Param("bonusContent") String bonusContent,
                                                  @Param("partyMemberNumber") Long partyMemberNumber,
                                                  @Param("awardDate") Date awardDate);
    /**
     * 查询所有数据,分页展示
     *
     * @param start
     * @param pageSize
     * @return
     */
    @Select("select * from party_member_awards limit #{start},#{pageSize}")
    List<PartyMemberAwards> selectAll(@Param("start") Integer start,
                                      @Param("pageSize") Integer pageSize);
    @Select("select count(*) from party_member_awards")
    Long selectTotal();
}




